'use strict';

import React, {Component} from 'react';
import {
  StyleSheet,
  Text,
  TouchableHighlight,
  View,
  TouchableNativeFeedback,
} from 'react-native';


/**
 * Button with round corners
*/
class FilledButton extends Component{
  static propTypes={
      style: View.propTypes.style,
      titleStyle: Text.propTypes.style,
  }

  constructor(props) {
      super(props);
  }
  
  render() {
    return (
      <TouchableHighlight
        onPress={this.props.onPress}
        underlayColor={this.props.highlightedColor}
        style={[styles.buttonBack, this.props.style]}
      >
        <Text
          style={[styles.buttonText, this.props.titleStyle]}
        >
          {this.props.title}
        </Text>
      </TouchableHighlight>
    );
    
  }
}

const styles = StyleSheet.create({
  buttonText: {
    backgroundColor: 'transparent',
    fontSize: 16,
    textAlign: 'center'
  },
  buttonBack: {
    paddingLeft: 12,
    paddingRight: 12,
    paddingTop:8,
    paddingBottom:8,
    borderRadius: 6,
  }
});

module.exports = FilledButton;
